Optimal. Leaf size=55 \[ \frac{2 i c^2}{f (a+i a \tan (e+f x))}-\frac{i c^2 \log (\cos (e+f x))}{a f}-\frac{c^2 x}{a} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.114738, antiderivative size = 55, normalized size of antiderivative = 1., number of steps used = 4, number of rules used = 3, integrand size = 31, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.097, Rules used = {3522, 3487, 43} \[ \frac{2 i c^2}{f (a+i a \tan (e+f x))}-\frac{i c^2 \log (\cos (e+f x))}{a f}-\frac{c^2 x}{a} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 3522
Rule 3487
Rule 43
Rubi steps
\begin{align*} \int \frac{(c-i c \tan (e+f x))^2}{a+i a \tan (e+f x)} \, dx &=\left (a^2 c^2\right ) \int \frac{\sec ^4(e+f x)}{(a+i a \tan (e+f x))^3} \, dx\\ &=-\frac{\left (i c^2\right ) \operatorname{Subst}\left (\int \frac{a-x}{(a+x)^2} \, dx,x,i a \tan (e+f x)\right )}{a f}\\ &=-\frac{\left (i c^2\right ) \operatorname{Subst}\left (\int \left (\frac{1}{-a-x}+\frac{2 a}{(a+x)^2}\right ) \, dx,x,i a \tan (e+f x)\right )}{a f}\\ &=-\frac{c^2 x}{a}-\frac{i c^2 \log (\cos (e+f x))}{a f}+\frac{2 i c^2}{f (a+i a \tan (e+f x))}\\ \end{align*}
Mathematica [A] time = 1.19416, size = 74, normalized size = 1.35 \[ -\frac{c^2 \left (2 \tan ^{-1}(\tan (f x)) (\tan (e+f x)-i)+\log \left (\cos ^2(e+f x)\right )+i \tan (e+f x) \left (\log \left (\cos ^2(e+f x)\right )+2\right )-2\right )}{2 a f (\tan (e+f x)-i)} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.026, size = 46, normalized size = 0.8 \begin{align*}{\frac{i{c}^{2}\ln \left ( \tan \left ( fx+e \right ) -i \right ) }{fa}}+2\,{\frac{{c}^{2}}{fa \left ( \tan \left ( fx+e \right ) -i \right ) }} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F(-2)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: RuntimeError} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 1.23292, size = 170, normalized size = 3.09 \begin{align*} -\frac{{\left (2 \, c^{2} f x e^{\left (2 i \, f x + 2 i \, e\right )} + i \, c^{2} e^{\left (2 i \, f x + 2 i \, e\right )} \log \left (e^{\left (2 i \, f x + 2 i \, e\right )} + 1\right ) - i \, c^{2}\right )} e^{\left (-2 i \, f x - 2 i \, e\right )}}{a f} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A] time = 2.77431, size = 83, normalized size = 1.51 \begin{align*} - \frac{i c^{2} \log{\left (e^{2 i f x} + e^{- 2 i e} \right )}}{a f} - \frac{\left (\begin{cases} 2 c^{2} x e^{2 i e} - \frac{i c^{2} e^{- 2 i f x}}{f} & \text{for}\: f \neq 0 \\x \left (2 c^{2} e^{2 i e} - 2 c^{2}\right ) & \text{otherwise} \end{cases}\right ) e^{- 2 i e}}{a} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] time = 1.68204, size = 171, normalized size = 3.11 \begin{align*} -\frac{-\frac{2 i \, c^{2} \log \left (\tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right ) - i\right )}{a} + \frac{i \, c^{2} \log \left ({\left | \tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right ) + 1 \right |}\right )}{a} + \frac{i \, c^{2} \log \left ({\left | \tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right ) - 1 \right |}\right )}{a} + \frac{3 i \, c^{2} \tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right )^{2} + 10 \, c^{2} \tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right ) - 3 i \, c^{2}}{a{\left (\tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right ) - i\right )}^{2}}}{f} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]